package com.example.demo.controller;


import com.example.demo.pojo.Course;
import com.example.demo.service.Class_CourseMapperService;
import com.example.demo.vo.Classes;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class Class_CourseController {
    @Autowired
    private Class_CourseMapperService class_courseMapperService;


    @RequestMapping(value = "queryCourseName" ,method = RequestMethod.POST)
    public List<Classes> queryCourseName(int id)
    {
       return class_courseMapperService.queryClass_Course(id);
    }
   /* @RequestMapping("test")
    public List<Classes> query(int id){
        return class_courseMapperService.query(id);
    }*/

    @RequestMapping(value = "queryStudentName",method = RequestMethod.POST)
    public List<Classes> queryStudentName(int id){
      return   class_courseMapperService.queryClass_stuName(id);
    }

    @RequestMapping(value = "queryTeacherName",method = RequestMethod.POST)
    public List<Classes> queryTeacherName(int id){
        return class_courseMapperService.queryClass_teaName(id);
    }
}
